package com.sjgtw.cloud.service;

import com.sjgtw.cloud.common.core.web.domain.AjaxResult;
import com.sjgtw.cloud.service.hystrix.SystemServerServiceHystrfix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "sjgtw-system", fallback = SystemServerServiceHystrfix.class)
@Component
public interface SystemServerService {

    @RequestMapping(value = "/system/service/getDeptById", method = RequestMethod.GET)
    AjaxResult getDeptById(@RequestParam(name = "deptId")Long deptId);

    @RequestMapping(value = "/system/service/getUserByIds", method = RequestMethod.GET)
    AjaxResult getUserByIds(@RequestParam(name = "userIds")String userIds);

    @RequestMapping(value = "/system/service/getSubDeptIdsByUserId", method = RequestMethod.GET)
    AjaxResult getSubDeptIdsByUserId(@RequestParam(name = "userId")Long userId);

    @RequestMapping(value = "/system/service/getDeptByNames", method = RequestMethod.GET)
    AjaxResult getDeptByNames(@RequestParam(name = "deptNames") String deptNames);

    @RequestMapping(value = "/system/service/getUserByNames", method = RequestMethod.GET)
    AjaxResult getUserByNames(@RequestParam(name = "names")String names);

    @RequestMapping(value = "/system/service/getUserDeptLevel", method = RequestMethod.GET)
    AjaxResult getUserDeptLevel(@RequestParam(name = "userId")Long userId);



}
